.class Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;
.super Ljava/lang/Object;
.source "CategoryAdapter.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;


# direct methods
.method constructor <init>(Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;)V
    .registers 2
    .param p1, "this$0"    # Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    .prologue
    .line 432
    iput-object p1, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .registers 9
    .param p1, "v"    # Landroid/view/View;

    .prologue
    .line 436
    invoke-virtual {p1}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/model/DownloadSource;

    .line 437
    .local v1, "item":Lcom/brixd/niceapp/model/DownloadSource;
    sget-object v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$6;->$SwitchMap$com$brixd$niceapp$activity$fragment$DownloadDialog$DownloadType:[I

    iget-object v4, v1, Lcom/brixd/niceapp/model/DownloadSource;->type:Lcom/brixd/niceapp/activity/fragment/DownloadDialog$DownloadType;

    invoke-virtual {v4}, Lcom/brixd/niceapp/activity/fragment/DownloadDialog$DownloadType;->ordinal()I

    move-result v4

    aget v3, v3, v4

    packed-switch v3, :pswitch_data_12a

    .line 491
    :goto_13
    return-void

    .line 439
    :pswitch_14
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    const-string v4, "google"

    invoke-virtual {v3, v1, v4}, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->trackDownload(Lcom/brixd/niceapp/model/DownloadSource;Ljava/lang/String;)V

    .line 441
    new-instance v0, Landroid/content/Intent;

    const-string v3, "android.intent.action.VIEW"

    invoke-direct {v0, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 442
    .local v0, "appIntent":Landroid/content/Intent;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "market://details?id="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, v1, Lcom/brixd/niceapp/model/DownloadSource;->packageName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 443
    const-string v3, "com.android.vending"

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 445
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-static {v3, v0}, Lcom/zuiapps/suite/utils/intent/IntentUtil;->isIntentAvailable(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result v3

    if-eqz v3, :cond_55

    .line 446
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_13

    .line 448
    :cond_55
    new-instance v2, Landroid/content/Intent;

    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    const-class v4, Lcom/brixd/niceapp/activity/WebViewActivity;

    invoke-direct {v2, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 449
    .local v2, "webIntent":Landroid/content/Intent;
    const-string v3, "URL"

    iget-object v4, v1, Lcom/brixd/niceapp/model/DownloadSource;->url:Ljava/lang/String;

    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 450
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_13

    .line 455
    .end local v0    # "appIntent":Landroid/content/Intent;
    .end local v2    # "webIntent":Landroid/content/Intent;
    :pswitch_6f
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    const-string v4, "wandoujia"

    invoke-virtual {v3, v1, v4}, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->trackDownload(Lcom/brixd/niceapp/model/DownloadSource;Ljava/lang/String;)V

    .line 457
    new-instance v0, Landroid/content/Intent;

    const-string v3, "android.intent.action.VIEW"

    invoke-direct {v0, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 458
    .restart local v0    # "appIntent":Landroid/content/Intent;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "market://details?id="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, v1, Lcom/brixd/niceapp/model/DownloadSource;->packageName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 459
    const-string v3, "com.wandoujia.phoenix2"

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 460
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-static {v3, v0}, Lcom/zuiapps/suite/utils/intent/IntentUtil;->isIntentAvailable(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result v3

    if-eqz v3, :cond_b1

    .line 461
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_13

    .line 463
    :cond_b1
    new-instance v2, Landroid/content/Intent;

    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    const-class v4, Lcom/brixd/niceapp/activity/WebViewActivity;

    invoke-direct {v2, v3, v4}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 464
    .restart local v2    # "webIntent":Landroid/content/Intent;
    const-string v3, "URL"

    iget-object v4, v1, Lcom/brixd/niceapp/model/DownloadSource;->url:Ljava/lang/String;

    invoke-virtual {v2, v3, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 465
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_13

    .line 470
    .end local v0    # "appIntent":Landroid/content/Intent;
    .end local v2    # "webIntent":Landroid/content/Intent;
    :pswitch_cc
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    const-string v4, "xiaomi"

    invoke-virtual {v3, v1, v4}, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->trackDownload(Lcom/brixd/niceapp/model/DownloadSource;Ljava/lang/String;)V

    .line 472
    new-instance v0, Landroid/content/Intent;

    const-string v3, "android.intent.action.VIEW"

    invoke-direct {v0, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 473
    .restart local v0    # "appIntent":Landroid/content/Intent;
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v4, "market://details?id="

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    iget-object v4, v1, Lcom/brixd/niceapp/model/DownloadSource;->packageName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 474
    const-string v3, "com.xiaomi.market"

    invoke-virtual {v0, v3}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 476
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-static {v3, v0}, Lcom/zuiapps/suite/utils/intent/IntentUtil;->isIntentAvailable(Landroid/content/Context;Landroid/content/Intent;)Z

    move-result v3

    if-eqz v3, :cond_10e

    .line 477
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v3, v3, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_13

    .line 480
    :cond_10e
    const-string v3, "Download from Xiaomi error."

    invoke-static {v3}, Lcom/zuiapps/suite/utils/log/LogUtil;->e(Ljava/lang/String;)V

    goto/16 :goto_13

    .line 484
    .end local v0    # "appIntent":Landroid/content/Intent;
    :pswitch_115
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    const-string v4, "direct"

    invoke-virtual {v3, v1, v4}, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->trackDownload(Lcom/brixd/niceapp/model/DownloadSource;Ljava/lang/String;)V

    .line 485
    iget-object v3, p0, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter$5;->this$0:Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;

    iget-object v4, v1, Lcom/brixd/niceapp/model/DownloadSource;->url:Ljava/lang/String;

    iget-object v5, v1, Lcom/brixd/niceapp/model/DownloadSource;->appName:Ljava/lang/String;

    iget v6, v1, Lcom/brixd/niceapp/model/DownloadSource;->appId:I

    # invokes: Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->directDownload(Ljava/lang/String;Ljava/lang/String;I)V
    invoke-static {v3, v4, v5, v6}, Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;->access$700(Lcom/brixd/niceapp/activity/fragment/adapter/CategoryAdapter;Ljava/lang/String;Ljava/lang/String;I)V

    goto/16 :goto_13

    .line 437
    nop

    :pswitch_data_12a
    .packed-switch 0x1
        :pswitch_14
        :pswitch_6f
        :pswitch_cc
        :pswitch_115
    .end packed-switch
.end method
